package com.vegetable.modules.service.finance.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vegetable.modules.entity.finance.PaymentAccountRelease;
import com.vegetable.modules.mapper.finance.PaymentAccountReleaseMapper;
import com.vegetable.modules.service.finance.IPaymentAccountReleaseService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 财务收款管理 服务实现类
 * </p>
 *
 * @author wangruijie
 * @since 2024-04-13
 */
@Slf4j
@Service
@AllArgsConstructor
public class PaymentAccountReleaseServiceImpl extends ServiceImpl<PaymentAccountReleaseMapper, PaymentAccountRelease> implements IPaymentAccountReleaseService {
    @Override
    public List<PaymentAccountRelease> selectByMainId(Long mainId) {
        QueryWrapper<PaymentAccountRelease> wrapper = new QueryWrapper<>();
        wrapper.eq("main_id", mainId);
        return baseMapper.selectList(wrapper);
    }

    @Override
    public List<PaymentAccountRelease> selectByMainIds(List<Long> mainIds) {
        QueryWrapper<PaymentAccountRelease> wrapper = new QueryWrapper<>();
        wrapper.in("main_id", mainIds);
        return baseMapper.selectList(wrapper);
    }
}
